package com.wzq.design.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 基础配置文件
 *
 * @author wangzhiqiang
 * @since 2023/7/5 15:06
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "base")
public class BaseConfig {
    /**
     * 默认密码
     */
    private String defaultPwd = "000000";

    /**
     * 登录过期时间
     */
    private Long loginTimeout=30*1000L;


    private CaptchaConfig captcha = new CaptchaConfig();

    /**
     * 验证码配置
     *
     * @author wangzhiqiang
     * @since 2023/7/17 10:45
     */
    @Data
    @Configuration
    @ConfigurationProperties(prefix = "base.captcha")
    public static class CaptchaConfig {
        private Boolean enabled=true;
        /**
         * 验证码随机字符长度
         */
        private int len = 5;
        /**
         * 验证码显示宽度
         */
        private int width = 130;
        /**
         * 验证码显示高度
         */
        private int height = 48;
    }

}
